-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add unit test coverage report and enforcement #529
Add unit test coverage report and enforcement #529
Conversation
5896141
to
4f63ee4
Compare
4f63ee4
to
d064108
Compare
'coral-dbt': 0.95, | ||
'coral-incremental': 0.95, | ||
'coral-pig': 0.85, | ||
'coral-schema': 0.80, | ||
'coral-service': 0.95, | ||
'coral-spark': 0.90, | ||
'coral-spark-plan': 0.74, | ||
'coral-trino': 0.80, | ||
'coral-visualization': 0.75, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming these thresholds are more or less just arbitrary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I came down to these values based on their existing test coverage in the codebase, and set the threshold a bit below the current coverage to make sure it won't cause flaky immediate build failures (this coverage not passing does fail build now, from past experience the coverage might have very slight difference depending on different execution environment)
@@ -79,3 +143,27 @@ subprojects { | |||
apply from: "${rootDir}/gradle/dependencies.gradle" | |||
apply from: "${rootDir}/gradle/java-publication.gradle" | |||
} | |||
|
|||
task jacocoRootReport(type: JacocoReport) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this task run every time we build
or must we explicitly call jacocoRootReport
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes this way it currently is in the PR is it's run as part of build
so it will fail build if code coverage drop below the threshold, (and devs can look at the test coverage report from each build)
and jacocoRootReport
can also be executed *independently
Closes #528
What changes are proposed in this pull request, and why are they necessary?
How was this patch tested?
Build and Test locally